<template>
  <div class="activityDayDetail">
		<x-header :left-options="{backText: ''}">活动日详情</x-header>		
		<!--数据加载动画 start-->
		<div class="loadingBox" v-show="status == 0">
			<div class="loading">
				<div>loading..</div>
				<div></div>
				<div></div>
			</div>
		</div>
		<!--数据加载动画 end-->

		<!--加载完成 start-->
  	<div class="loadingOver" v-show="status == 1">
  		<div class="activityDayDetailBox">
  			<div class="activityDayDetail-title" v-text="activityDayDetailTitle"></div>
				<div class="activityDayDetail-info" v-html="activityDayDetailInfo"></div>
  		</div>
		</div>
		<!--加载完成 end-->
	</div>
</template>

<script>
import Api from 'assets/js/api';
import init from '../assets/js/init';
import { XHeader, Actionsheet, TransferDom } from 'vux'

var api = new Api();

export default {
  name: 'briefingDetail',
  data () {
    return {
    	status:'0',//默认加载状态为0
    	activityDayDetailTitle:'',
    	activityDayDetailInfo:'',
    }
  },
  created(){
  	var activityDayDetailTitle = localStorage.getItem("activityDayDetailTitle");
		var activityDayDetailInfo = localStorage.getItem("activityDayDetailInfo");
		console.log(activityDayDetailTitle);
  	this.activityDayDetailTitle = activityDayDetailTitle,
    this.activityDayDetailInfo = activityDayDetailInfo,
    this.status = 1;
  },
  components:{
  	XHeader,
    Actionsheet,
  },
}
</script>

<!-- Add "scoped" attribute to limit CSS to this component only -->
<style>
	@import url("../assets/css/common.css");
	.activityDayDetail{
		width: 100%;
		height: 100%;
	}
	.activityDayDetail .loadingOver{
		width: 100%;
		height: 100%;
	}
	.vux-header{
		background-color: #f00 !important;
		position: fixed !important;
		top: 0;
		left: 0;
		z-index: 2000;
		width: 100%;
	}
	.vux-header .vux-header-left .left-arrow:before{
		border: 2px solid #fff !important;
    border-width: 2px 0 0 2px !important;
	}
	.activityDayDetailBox{
		width: 100%;
		height: 100%;
		background-color: #fff;
		box-sizing: border-box;
		padding: 55px 0.5rem 0;
		overflow: scroll;
	}
	.activityDayDetail-title{
		width: 100%;
		line-height: 1rem;
		text-align: center;
		font-size: 0.8rem;
		margin-bottom: 1rem;
		padding-bottom: 0.5rem;
		border-bottom: 1px dotted #333;
		color: #333;
	}
	.activityDayDetail-info p,.activityDayDetail-info span{
		font-size: 0.5rem !important;
		text-indent: 1rem !important;
		line-height: 0.8rem !important;
	}
	.activityDayDetail-info img{
		max-width: 90% !important;
		height: initial !important;  
		width: initial !important;	
	}
	
	/*加载动画*/
	.loadingBox{
		width: 100%;
		height: 100%;
		display: flex;
		display: -webkit-flex;
		flex-direction: column;
		-webkit-flex-direction: column;
		align-items: center;
		-webkit-align-items: center;
		justify-content: center;
		-webkit-justify-content: center;
	}
	.loading {
	    border-radius: 50%;
	    font-size: 20px;
	    height: 100px;
	    line-height: 90px;
	    position: relative;
	    text-align: center;
	    width: 100px;
	}
	.loading > div:nth-child(2) {
	    border-color: #FFF;
	    left: 0px;
	    width: 90px;
	}
	.loading > div:nth-child(3) {
	    border-color: #009933;
	    left: -5px;
	    width: 100px;
	    -webkit-animation-delay: 0.5s;
	    -moz-animation-delay: 0.5s;
	    -ms-animation-delay: 0.5s;
	    -o-animation-delay: 0.5s;
	    animation-delay: 0.5s;
	}
	.loading > div:nth-child(2), .loading > div:nth-child(3) {
	    background-color: rgba(255, 255, 255, 0.2);
	    border: 5px solid #FFF;
	    border-radius: 50%;
	    box-shadow: 0 0 5px 0 #f00;
	    height: 100px;
	    position: absolute;
	    top: 0px;
	    border-top-width: 0;
	    border-bottom-width: 0;
	    -webkit-animation: anim3 2s linear infinite;
	    -moz-animation: anim3 2s linear infinite;
	    -ms-animation: anim3 2s linear infinite;
	    -o-animation: anim3 2s linear infinite;
	    animation: anim3 2s linear infinite;
	}
	@keyframes anim3{
		0% {
		    transform: rotateY(0deg);
		}
		50% {
		    transform: rotateY(180deg);
		}
		100% {
		    transform: rotateY(360deg);
		}
	}
</style>
